package com.example.star.api_service;

import com.example.star.entity.Message;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

import java.util.List;

public interface MessageApi {
    @GET("/api/messages/{starName}")
    Call<List<Message>> getMessagesByStarName(@Path("starName") String starName);

    @GET("/api/allMessages/{starName}")
    Call<List<Message>> getAllMessagesByStarName(@Path("starName") String starName);

    @POST("/api/sendMessage")
    Call<Void> sendMessage(@Body Message message);

    @GET("/api/user/{userName}")
    Call<List<Message>> getUserMessages(@Path("userName") String userName);
}